package com.wn.pettyloan.service.impl;

import com.wn.pettyloan.entity.ContractTemplate;
import com.wn.pettyloan.mapper.ContractTemplateMapper;
import com.wn.pettyloan.service.ContractTemplateService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author GUOYUNONG
 * @version 1.0
 * Create by 2022/12/7 14:23
 */
@Service
public class ContractTemplateServiceImpl implements ContractTemplateService {
    @Resource
    private ContractTemplateMapper contractTemplateMapper;
    @Override
    public List<ContractTemplate> selectAll() {
        return contractTemplateMapper.selectAll();
    }

    @Override
    public int deleteByPrimaryKey(Long id) {
        return contractTemplateMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insertSelective(ContractTemplate record) {
        return contractTemplateMapper.insertSelective(record);
    }

    @Override
    public ContractTemplate selectByPrimaryKey(Long id) {
        return contractTemplateMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(ContractTemplate record) {
        return contractTemplateMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public ContractTemplate selByProductId(Long productId) {
        return contractTemplateMapper.selectByProductId(productId);
    }

    @Override
    public int updateById(ContractTemplate contractTemplate) {
        return contractTemplateMapper.updateByPrimaryKeySelective(contractTemplate);
    }

}
